package com.sczmgk.hotline_pzh.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.sczmgk.hotline_pzh.R;
import com.sczmgk.hotline_pzh.entity.LeftMenuItem;
import com.sczmgk.hotline_pzh.utils.MyToast;

import java.util.List;
import java.util.Observable;
import java.util.Observer;

/**
 * Created by Administrator on 2016/2/25.
 */
public class LeftMenuFregment extends Fragment implements Observer{

    private final String TAG = LeftMenuFregment.class.getSimpleName();

    private View rootView;
    /**
     * 菜单ListView
     */
    private ListView mLeftMenuListView;
    private List<LeftMenuItem> menuItemList;

    private Handler mHandler = new Handler() {
        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
        }
    };

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        rootView = inflater.inflate(R.layout.left_menu, null);
        return rootView;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        createMenuData();
        initView();
        initUserInfo();

    }

    private void initUserInfo() {

    }

    /**
     * 找到控件
     */
    private void initView() {
    }

    private void showToast(Object msg) {
        MyToast.showDebug(getActivity(), msg + "  点击了！");
    }

    /**
     * 生成菜单数据
     */
    private void createMenuData() {

    }


    /**
     * 刷新左侧菜单显示的用户信息
     */
    private void refreshUserInfo() {

    }

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
    }

    @Override
    public void onResume() {
        super.onResume();
    }


    @Override
    public void update(Observable observable, Object o) {

    }
}
